/*
 * Class29 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
public class Class29 {
	private boolean aBoolean573 = true;
	private int anInt574;
	private int[] anIntArray575;
	private int[] anIntArray576;
	int anInt577;
	int anInt578;
	int anInt579;
	private int anInt580;
	private int anInt581;
	private int anInt582;
	private int anInt583;
	private int anInt584;
	public static int anInt585;

	public final void method308(byte i, Packet packet) {
		(this).anInt579 = packet.getUByte();
		if (i == 6) {
		} else {
			throw new NullPointerException();
		}
		(this).anInt577 = packet.getInt();
		(this).anInt578 = packet.getInt();
		method309(packet, 0);
	}

	public final void method309(Packet packet, int i) {
		anInt574 = packet.getUByte();
		anIntArray575 = new int[anInt574];
		anIntArray576 = new int[anInt574];
		if (i == 0) {
			for (int i_0_ = 0; i_0_ < anInt574; i_0_++) {
				anIntArray575[i_0_] = packet.getUShort();
				anIntArray576[i_0_] = packet.getUShort();
			}
		}
	}

	final void method310(boolean bool) {
		anInt580 = 0;
		anInt581 = 0;
		if (bool) {
			anInt582 = 0;
			anInt583 = 0;
			anInt584 = 0;
		}
	}

	final int method311(int i, int i_1_) {
		if (i != 0) {
			for (int i_2_ = 1; i_2_ > 0; i_2_++) {
				/* empty */
			}
		}
		if (anInt584 >= anInt580) {
			anInt583 = anIntArray576[anInt581++] << 15;
			if (anInt581 >= anInt574) {
				anInt581 = anInt574 - 1;
			}
			anInt580 = (int) (anIntArray575[anInt581] / 65536.0 * i_1_);
			if (anInt580 > anInt584) {
				anInt582 = (((anIntArray576[anInt581] << 15) - anInt583) / (anInt580 - anInt584));
			}
		}
		anInt583 += anInt582;
		anInt584++;
		return anInt583 - anInt582 >> 15;
	}
}
